Skip to content

Conversation

@SuperSandro2000
Copy link
Member

Closes #259

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the deprecated misspell linter with typos for spell checking across the repository. The migration introduces a new typos configuration system, updates build tools and CI workflows, and adds validation to prevent use of the deprecated configuration.

  • Adds a new typos configuration section with support for excluding files and customizing word mappings
  • Removes misspell from golangci-lint and GitHub Actions workflows, replacing it with the typos action
  • Adds validation to fail fast if the deprecated spellCheck.ignoreWords configuration is used

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/core/config.go Adds TyposConfiguration struct, deprecates SpellCheckConfiguration, adds validation to enforce migration
internal/core/constants.go Replaces MisspellAction constant with TyposAction constant
internal/typos/typos.go New package implementing typos configuration rendering with automatic exclusion of go.mod and vendor/
internal/typos/typos.toml.tmpl Template for generating .typos.toml configuration file
internal/golangcilint/golangci_lint.go Removes MisspellIgnoreWords from template data
internal/golangcilint/golangci.yaml.tmpl Removes misspell linter and its ignore-rules configuration
internal/ghworkflow/workflow_checks.go Replaces misspell action with typos action, removes unused imports and permission requirements
internal/makefile/makefile.go Adds run-typos target generation when typos is enabled
internal/nix/nix-shell.go Adds typos to nix packages list when enabled
main.go Adds typos.RenderConfig call when typos is enabled
shell.nix Adds typos to nix shell dependencies
Makefile Adds run-typos target with installation instructions
README.md Updates documentation replacing spellCheck section with typos section including configuration examples
.typos.toml New typos configuration file for the project itself
.golangci.yaml Removes misspell linter from enabled linters list
.github/workflows/checks.yaml Replaces misspell action with typos action, removes pull-requests permission

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Contributor

@majewsky majewsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, and GHE allowlist was extended. Please address the CI error, then this is good to go.

@SuperSandro2000
Copy link
Member Author

This is what I mean by misspell doesn't find things 😂

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/sapcc/go-makefile-maker 0.00% (ø)
github.com/sapcc/go-makefile-maker/internal/core 0.00% (ø)
github.com/sapcc/go-makefile-maker/internal/ghworkflow 0.00% (ø)
github.com/sapcc/go-makefile-maker/internal/golangcilint 0.00% (ø)
github.com/sapcc/go-makefile-maker/internal/makefile 7.54% (-0.04%) 👎
github.com/sapcc/go-makefile-maker/internal/nix 0.00% (ø)
github.com/sapcc/go-makefile-maker/internal/typos 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/sapcc/go-makefile-maker/internal/core/config.go 0.00% (ø) 46 (+4) 0 46 (+4)
github.com/sapcc/go-makefile-maker/internal/core/constants.go 0.00% (ø) 12 0 12
github.com/sapcc/go-makefile-maker/internal/ghworkflow/workflow_checks.go 0.00% (ø) 0 0 0
github.com/sapcc/go-makefile-maker/internal/golangcilint/golangci_lint.go 0.00% (ø) 0 0 0
github.com/sapcc/go-makefile-maker/internal/makefile/makefile.go 0.00% (ø) 217 (+2) 0 217 (+2)
github.com/sapcc/go-makefile-maker/internal/nix/nix-shell.go 0.00% (ø) 0 0 0
github.com/sapcc/go-makefile-maker/internal/typos/typos.go 0.00% (ø) 0 0 0
github.com/sapcc/go-makefile-maker/main.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Copy link
Contributor

@majewsky majewsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, and GHE allowlist was extended. Please address the CI error, then this is good to go.

"CLICOLOR": "1",
},
})
j.addStep(jobStep{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As always, surprising actions should be documented.

Suggested change
j.addStep(jobStep{
// TyposAction drops its binary into the repository root; if we do not clean this up,
// `reuse lint` will complain about it not having license information
j.addStep(jobStep{

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace misspell with typos

3 participants